package com.neusoft.elmboot.mapper;

import java.math.BigDecimal;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.neusoft.elmboot.po.Integral;
import com.neusoft.elmboot.po.Wallet;

@Mapper
public interface IntegralMapper {
    @Insert("insert into integral values(#{userId}, 10)")
    public int saveIntegral(String userId);

    @Update("update integral set count = #{count} where userId = #{userId}")
    public int updateCount(String userId, BigDecimal count);

    @Select("select * from integral where userId = #{userId}")
    public Integral getIntegralByUserid(String userId);

}
